<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<html>
	<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript">
		function reset_vendor(){
  			a = $('#vendor').combobox('getData');
  			if (a!=null && a.length>0){
				$('#vendor').combobox('select', a[0].vendorid);
  			}	
		}

    	$(document).ready(function(){
    		$('#del_finger_menu').menu();    		
    		$('#vendor').combobox({onLoadSuccess:reset_vendor});
     		$('#check_manager_detail_panel').window({onClose:function(){
     		  	$('#finger').val('');
     		  	$('#ver_result').text('');
     		},onOpen:function(){
     			$('#vendor').combobox('reload','queryVendors.action');
     		}});
    		
     		$('#save').click(function (){
              post_request('checkManager.action',{workno:$('#workno').text(),
              verresult:$('#ver_result').text(),finger:$('#finger').val(),
              	vendor:$('#vendor').combobox('getValue')},
                  function (data){
                    $.messager.alert('复核管理员指纹', data.result.message, 'info');
                    
                    if (data.result.code=='0'){
                      var $tbl = $('#manager_table');
                      var row = $tbl.datagrid('getSelected');
                      var index = $tbl.datagrid('getRowIndex',row);
                      row.checkname='已复核';
                      $tbl.datagrid('refreshRow', index);
                      
                      $('#check_manager_detail_panel').window('close');
                    }
                  });
    		});

     		$('#cancel').click(function (){
     			$('#check_manager_detail_panel').window('close');
    		});

     		$('#verifyfinger').click(function (){
     			if (get_finger_feature()==false){
     			  return;
     			}
                post_request('verifyManagerFinger.action',{workno:$('#workno').text(),
                  finger:$('#finger').val(),vendor:$('#vendor').combobox('getValue')},
                  function (data){
                    $('#ver_result').text(data.result.message);
                    $.messager.alert('比对指纹', data.result.message, 'info');
                    
                  });
    		});
    	});
    </script>
	</head>
	<body>
	
    <div id="check_manager_detail_panel" collapsible="false" fit="false" title="复核管理员" 
    	resizable="false" collapsible="false" minimizable="false" maximizable="false" 
    	closable="true" closed="true" icon="icon-save" modal="true" class="jquery_window">
    	<s:form id="check_finger_form" action="checkManager" theme="simple"
    		cssStyle="margin:20px,30px, 20px, 50px">
    		<s:hidden id="finger"></s:hidden>
    		<s:include value="/app/finger_info.jsp"></s:include>
    		<table>
    			<tr height="20px">
    				<td><label style="white-space: nowrap">所属机构：</label></td>
    				<td width="80px"><label id="deptno"></label></td>
    				<td><label style="white-space: nowrap">管理员号：</label></td>
    				<td><label id="workno"></label></td>
    			</tr>
    			<tr height="20px">
    				<td><label style="white-space: nowrap">姓名：</label></td>
    				<td width="80px"><label id="name"></label></td>
    				<td><label style="white-space: nowrap">操作员：</label></td>
    				<td width="80px"><label id="modmgr"></label></td>
    			</tr>
    			<tr height="24px">
    				<td><label style="white-space: nowrap">身份证号：</label></td>
    				<td colspan="3"><label id="identifyno"></label></td>
    			</tr>
    			<tr height="24px">
    				<td><label style="white-space: nowrap">角色：</label></td>
    				<td colspan="3"><label id="rolename"></label></td>
    			</tr>
    			<tr height="24px">
    				<td><label style="white-space: nowrap">电话：</label></td>
    				<td colspan="3"><label id="telephone"></label></td>
    			</tr>
    			<tr height="24px">
    				<td><label style="white-space: nowrap">地址：</label></td>
    				<td colspan="3"><label id="address"></label></td>
    			</tr>
    			<tr><td colspan="4"><s:include value="/app/finger_hand.jsp">
    				<s:param name="mode" value="1"/></s:include></td></tr>
    			<tr height="24px">
    				<td><s:label value="指纹厂商:" for="vendor"/></td>
    				<td colspan="3"><input valueField="vendorid" textField="vendorname" 
    					id="vendor" name="vendor" class="easyui-combobox" 
    					panelHeight="auto" editable="false"/></td>
    			</tr>
    			<tr height="30px">
    				<td colspan="4" align="left">
    					<button id="verifyfinger" class="buttons_css" style="width:100px">验证管理员指纹</button>
    					<s:label style="width:10px"></s:label>
    					<s:label id="ver_result"></s:label>
    				</td>
    			</tr>
    			<tr>
    				<td colspan="4" align="center">
            			<button id="save" class="buttons_css" style="width:70px">
            				<label style="70px" class="save_css">保存</label></button>
            			<label style="width:20px"></label>
            			<button id="cancel" class="buttons_css" style="width:70px">
            				<label style="70px" class="cancel_css">返回</label></button>
    				</td>
    			</tr>
    		</table>
    	</s:form>
    </div>
    </body>
</html>